package com.lottery.material.dao.article;

import com.lottery.material.pojo.article.ArticleCompetitionInfo;
import com.lottery.material.pojocustom.article.ArticleCompetitionInfoCustom;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @description 文章赛事内容信息Mapper
 * @author rambo
 * @date 2019年4月11日 下午9:21:56
 */
@SuppressWarnings("JavaDoc")
public interface ArticleCompetitionInfoMapper {
	
    Integer deleteByPrimaryKey(Integer id);

    Integer insert(ArticleCompetitionInfo record);

    Integer insertSelective(ArticleCompetitionInfo record);

    ArticleCompetitionInfo selectByPrimaryKey(Integer id);

    Integer updateByPrimaryKeySelective(ArticleCompetitionInfo record);

    Integer updateByPrimaryKey(ArticleCompetitionInfo record);

    /**
     * description: 根据文章id和赛事收费类型查询
     * author sunny
     * createDate 2019-04-19 下午 1:42
     * @param articleId
     * @param competitionChargeType
     * @return
     */
    List<Map<String, Object>> findByArticleIdAndType(@Param("articleId") String articleId, @Param("competitionChargeType") Integer competitionChargeType);

    /**
     * @description 批量插入文章赛事内容
     * @param articleCompetitionList
     * @author houjie
     * @return
     */
    Integer insertList(List<ArticleCompetitionInfo> articleCompetitionList);

    /**
     * description: 根据文章id查询文章赛事
     * author sunny
     * createDate 2019-04-24 下午 7:45
     * @param articleId
     * @return
     */
    List<ArticleCompetitionInfoCustom> findByArticleId(String articleId);
}
